Chapter1 From Competitive Programmer's Handbook By Antti Laaksonen